﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:UserCpeInServiceReference="clr-namespace:cpe.cpein.UI.UserCpeInServiceReference" x:Class="cpe.cpein.UI.Controls.UCListUsers" 
             mc:Ignorable="d" 
             d:DesignHeight="660" d:DesignWidth="930"
             Background="White" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="1" Text="Recherche" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="18" />
        <Rectangle Grid.ColumnSpan="9" Grid.Column="1" Fill="#FFF4F4F5" Margin="0,10,0,0" Grid.Row="1" Grid.RowSpan="3" Stroke="Black" VerticalAlignment="Stretch" StrokeThickness="1"/>
        <TextBlock Text="Nom" VerticalAlignment="Center" FontSize="14" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="1" Margin="20,0,0,0"/>
        <TextBox Name="txtName" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2"/>
        <TextBlock Text="Relation" VerticalAlignment="Center" FontSize="14" Grid.Column="5" Grid.Row="2" Grid.ColumnSpan="2" Margin="32,6,88,7"/>
        <CheckBox Name="chkRelation"  Grid.Column="6" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Button x:Name="btNew" Content="Nouveau" Grid.Column="9" Grid.Row="4"/>
        <Button x:Name="btRefresh" Content="Rechercher" Grid.Column="5" Grid.Row="4" Click="btRefresh_Click"/>
        <Button x:Name="btREmpty" Content="Réinitialiser" Grid.Column="6" Grid.Row="4"/>
        
        <TextBlock Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="1" Text="Utilisateurs" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="18" />
        <Rectangle Grid.ColumnSpan="9" Grid.Column="1" Fill="#FFF4F4F5" Margin="0,10,0,0" Grid.Row="5" Grid.RowSpan="16" Stroke="Black" VerticalAlignment="Stretch" StrokeThickness="1"/>
        <DataGrid MouseDoubleClick="UserGrid_DoubleClick" SelectedValuePath="Id" RowHeight="30" IsReadOnly="True" AutoGenerateColumns="False" Name="UserGrid" Background="White" Grid.Column="1" Grid.ColumnSpan="9" Grid.RowSpan="15" Margin="10,0,10,10" Grid.Row="7" VerticalAlignment="Stretch" BorderThickness="0">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Id}" FontSize="16" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding Name}" FontSize="16" MinWidth="200" />
                <DataGridTextColumn Binding="{Binding Lastname}" FontSize="16" MinWidth="200" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
